package com.yeung.exam;

import java.util.Arrays;
import java.util.Scanner;

public class 搬运工搬东西 {
    int times = 0;
    static int worker;
    static boolean[] used;
    static int[] workerIndex;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        worker = sc.nextInt();
        int boxs = sc.nextInt();
        used = new boolean[worker];
        workerIndex = new int[worker];
        Arrays.fill(workerIndex, 0);

    }

    public static int action(int boxs[], int wokerIndex) {
        if (wokerIndex == boxs.length) {
            return 0;

        }
        for (int i = 0; i < worker; i++) {
            if (!used[i]) {
                used[i] = true;
                //只加指针;
                int onlyAdd = action(boxs, ++wokerIndex);
                //搬动物品
                if (boxs[wokerIndex] > 0)
                    boxs[wokerIndex]--;
                int move = action(boxs, wokerIndex);
                used[i] = false;

            }
        }
        return 0;

    }
}
